package ar.edu.itba.it.cg.grupo01.game.action;

import com.jme.input.ChaseCamera;
import com.jme.input.action.InputAction;
import com.jme.input.action.InputActionEvent;
import com.jme.math.Vector3f;

public class SelectCameraAction extends InputAction {

    ChaseCamera chaser;

    public SelectCameraAction(ChaseCamera chaser) {
        this.chaser = chaser;
    }

    public void setChaser(ChaseCamera chaser) {
		this.chaser = chaser;
	}

	public void performAction(InputActionEvent inputActionEvent) {

        switch (inputActionEvent.getTriggerCharacter()) {
            case '1':
                chaser.setMinDistance(1);
                chaser.setMaxDistance(1);
                break;

            case '2':
                chaser.setMinDistance(70);
                chaser.setMaxDistance(90);
                break;

            case '3':
                chaser.setMinDistance(150);
                chaser.setMaxDistance(180);
                break;
        }
    }
}
